package com.newly.common.base.entity.business.Po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
* @anthor sbq
* @date 2021/10/25 11:25
*/
@Data
@TableName(value = "gov_company")
public class Company implements Serializable {
    /**
     * id主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    /**
     * 源头企业名字
     */
    @TableField(value = "name")
    @NotBlank(message = "企业名称不能为空")
    private String name;

    /**
     * 企业类型 0-国有 1-集体 2-股份制 3-私有 4-其他
     */
    @TableField(value = "type")
    @NotNull(message = "企业类型不能为空")
    private Integer type;

    /**
     * 企业地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 所属机构id
     */
    @TableField(value = "org_belong")
    private Integer orgBelong;

    /**
     * 建设时间
     */
    @TableField(value = "build_time")
    private String buildTime;

    /**
     * 经度
     */
    @TableField(value = "longitude")
    private String longitude;

    /**
     * 纬度
     */
    @TableField(value = "latitude")
    private String latitude;

    /**
     * 联系人id（运管处责任人）-暂不维护
     */
    @TableField(value = "contacts")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long contacts;

    /**
     * 运管处责任人联系电话
     */
    @TableField(value = "contacts_phone")
    private String contactsPhone;

    /**
     * 运管处责任人姓名
     */
    @TableField(value = "contacts_name")
    private String contactsName;

    /**
     * 运管处责任人身份证
     */
    @TableField(value = "contacts_id_card")
    private String contactsIdCard;

    /**
     * 电话号码
     */
    @TableField(value = "phone_number")
    private String phoneNumber;

    /**
     *  省份编号
     */
    @TableField(value = "province_code")
    private String provinceCode;

    /**
     * 城市编号
     */
    @TableField(value = "city_code")
    private String cityCode;

    /**
     * 区/县编号
     */
    @TableField(value = "area_code")
    private String areaCode;

    /**
     * 街道/镇编号
     */
    @TableField(value = "street_code")
    private String streetCode;

    /**
     * 企业源头货物类型 0-散货 1-集装箱 2-高岭土 3-沥青
     */
    @TableField(value = "goods_type")
    private String goodsType;

    /**
     * 企业法人名称
     */
    @TableField(value = "corporate")
    private String corporate;

    /**
     * 企业法人联系电话
     */
    @TableField(value = "corporate_phone")
    private String corporatePhone;

    /**
     * 0-正常 1-已删除
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建人id
     */
    @TableField(value = "create_user")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long createUser;

    /**
     * 录入系统的时间
     */
    @TableField(value = "create_time")
    private String createTime;

    /**
     * 权限id
     */
    @TableField(exist = false)
    private Integer permId;

    /**
     * 超限次数
     */
    @TableField(exist = false)
    private Integer overweightNum = 0;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_NAME = "name";

    public static final String COL_TYPE = "type";

    public static final String COL_ADDRESS = "address";

    public static final String COL_ORG_BELONG = "org_belong";

    public static final String COL_BUILD_TIME = "build_time";

    public static final String COL_LONGITUDE = "longitude";

    public static final String COL_LATITUDE = "latitude";

    public static final String COL_CONTACTS = "contacts";

    public static final String COL_PHONE_NUMBER = "phone_number";

    public static final String COL_PROVICE_CODE = "provice_code";

    public static final String COL_CITY_CODE = "city_code";

    public static final String COL_AREA_CODE = "area_code";

    public static final String COL_STREET_CODE = "street_code";

    public static final String COL_CREATE_USER = "create_user";

    public static final String COL_CREATE_TIME = "create_time";
}